import "@/styles/global.scss";

import { createApp } from "vue";
import pinia from "@/stores/index";
import ElementPlus from "element-plus";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// 预设动画

import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 全局引入element-plus样式
import "element-plus/dist/index.css";

import SplitPane from "@/components/SplitPane/index.vue";

import App from "./App.vue";
import router from "./router";

const app = createApp(App);

app.use(pinia);
app.use(router);
app.use(ElementPlus, {
  locale: zhCn,
  size: "small",
});

app.component("SplitPane", SplitPane);
app.config.globalProperties.$icons = [];
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.config.globalProperties.$icons.push(key);
  app.component(key, component);
}
app.mount("#app");
